package com.ly.heart.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingInvoicePayableEntity;
import com.ly.heart.domain.dto.KingInvoicePayableDto;
import com.ly.heart.domain.vo.KingInvoicePayableMenuVo;
import com.ly.heart.domain.vo.KingInvoicePayableVo;

/**
 * 金蝶-发票-应付单/采购开票Service接口
 *
 * @author wutao
 * @date 2024-06-26
 */
public interface IKingInvoicePayableService extends IService<KingInvoicePayableEntity> {
    /**
     * 查询金蝶-发票-应付单/采购开票
     *
     * @param id 金蝶-发票-应付单/采购开票ID
     * @return 金蝶-发票-应付单/采购开票
     */
    KingInvoicePayableVo selectKingInvoicePayableEntityById ( String id );

    /**
     * 通过Id查询单个对象
     *
     * @param id
     * @return
     */
    KingInvoicePayableEntity querySingleById ( String id );

    /**
     * 查询金蝶-发票-应付单/采购开票列表
     *
     * @param kingInvoicePayableEntity 金蝶-发票-应付单/采购开票
     * @return 金蝶-发票-应付单/采购开票集合
     */
    List<KingInvoicePayableEntity> selectKingInvoicePayableEntityList ( KingInvoicePayableEntity kingInvoicePayableEntity );

    Integer queryCount ( KingInvoicePayableEntity kingInvoicePayableEntity );


    /**
     * 新增金蝶-发票-应付单/采购开票
     *
     * @param kingInvoicePayableDto 金蝶-发票-应付单/采购开票
     * @return 结果
     */
    AjaxResult draft ( KingInvoicePayableDto kingInvoicePayableDto );

    /**
     * 新增金蝶-发票-应付单/采购开票
     *
     * @param payableEntity 金蝶-发票-应付单/采购开票
     * @return 结果
     */
    AjaxResult submit ( KingInvoicePayableEntity payableEntity );

    /**
     * 应付单审批后业务回调
     *
     * @param id
     * @return
     */
    AjaxResult approve ( String id );

    /**
     * 入库单审核完成后调用该方法
     * @param inventoryId
     * @param orderId
     * @return
     */
    AjaxResult inventoryApprove ( String inventoryId, String orderId );

    /**
     * 修改金蝶-发票-应付单/采购开票
     *
     * @param kingInvoicePayableDto 金蝶-发票-应付单/采购开票
     * @return 结果
     */
    AjaxResult updateKingInvoicePayableEntity ( KingInvoicePayableDto kingInvoicePayableDto );

    /**
     * 批量删除金蝶-发票-应付单/采购开票
     *
     * @param ids 需要删除的金蝶-发票-应付单/采购开票ID
     * @return 结果
     */
    AjaxResult deleteKingInvoicePayableEntityByIds ( String[] ids );

    /**
     * 付款单，选择应付单
     * @param kingInvoicePayableEntity
     * @return
     */
    List<KingInvoicePayableMenuVo> queryList ( KingInvoicePayableEntity kingInvoicePayableEntity );

    Integer queryCountByMenu ( KingInvoicePayableEntity kingInvoicePayableEntity );

    /**
     * 应付单下推冲红应付单，以物料为主查询
     * @param kingInvoicePayableEntity
     * @return
     */
    AjaxResult queryListByPayable ( KingInvoicePayableEntity kingInvoicePayableEntity );

}
